#include <bits/stdc++.h>
using namespace std;
const int M=100007;
int a[M]= {0};
bool d[M]= {0};
int main()
{
    freopen("duel.in","r",stdin);
    freopen("duel.out","w",stdout);
    int n;
    cin>>n;
    int minn=1e9+7;
    for(int i=1; i<=n; i++)
    {
        cin>>a[i];
        if(a[i]<minn)minn=a[i];
    }
    sort(a+1,a+n+1);
    for(int i=1; i<=n; i++)
    {
        if(a[i]==minn)continue;
        for(int j=1; j<=i; j++)
        {
            if(d[j]==0)
            {
                d[j]=1;
                break;
            }
        }
    }
    int ans=0;
    for(int i=1; i<=n; i++)if(d[i]==0)ans++;
    cout<<ans;
    return 0;
}
